home *** CD-ROM | disk | FTP | other *** search
- property clrseed, editfld, rando, FieldCstLST, FieldTxLST, FieldChanLST, PsychicChanLST, FieldArtLST
-
- on birth me
- randojig(me)
- setup(me)
- return me
- end
-
- on report me
- put FieldCstLST
- put FieldTxLST
- put FieldChanLST
- put PsychicChanLST
- put FieldArtLST
- end
-
- on randojig me
- set rando to random(30) + random(30)
- end
-
- on setup me
- set FieldChanLST to [3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
- set FieldCstLST to []
- set fldnum to the number of cast "DivNam.1"
- add(FieldCstLST, fldnum)
- repeat with x = 1 to 9
- add(FieldCstLST, fldnum + x)
- end repeat
- set FieldArtLST to []
- set fldnum to the number of cast "MapArtField1"
- add(FieldArtLST, fldnum)
- repeat with x = 1 to 9
- add(FieldArtLST, fldnum + x)
- end repeat
- ResetText(me)
- set clrseed to 0
- end
-
- on ResetText me
- set FieldTxLST to []
- repeat with x = 1 to 5
- add(FieldTxLST, "Type Name " & x & " Here")
- end repeat
- repeat with x = 6 to 10
- add(FieldTxLST, "Type Idea " & x & " Here")
- end repeat
- printall(me)
- end
-
- on texto me, x
- global PsyMan
- RandoBeepSnd()
- set editfld to x
- set fldnum to getAt(FieldCstLST, x)
- hilite field fldnum
- set tx to field fldnum
- put tx into field fldnum
- if x < 6 then
- go("enterNam" & editfld)
- else
- set n to editfld - 5
- go("enterIdea" & n)
- end if
- set keydowncmdtx to "checkkey PsyMan"
- set the keyDownScript to keydowncmdtx
- end
-
- on checkkey me
- if (the key <> RETURN) and (the key <> TAB) then
- exit
- end if
- if the key = RETURN then
- go("setup1")
- grabnames(me)
- set the keyDownScript to EMPTY
- exit
- else
- if the key = TAB then
- if editfld < 10 then
- set editfld to editfld + 1
- else
- set editfld to 1
- end if
- grabnames(me)
- texto(me, editfld)
- end if
- end if
- end
-
- on grabnames me
- repeat with x = 1 to 10
- set tx to field getAt(FieldCstLST, x)
- setAt(FieldTxLST, x, tx)
- put tx into field getAt(FieldArtLST, x)
- end repeat
- end
-
- on printall me
- repeat with x = 1 to 10
- put getAt(FieldTxLST, x) into field getAt(FieldCstLST, x)
- end repeat
- end
-
- on continue1 me
- RandoResultSnd()
- grabnames(me)
- set PsychicChanLST to [:]
- repeat with x = 1 to 5
- set tx to getAt(FieldTxLST, x)
- if tx starts "Type Name" then
- nothing()
- next repeat
- end if
- addProp(PsychicChanLST, 1, getAt(FieldChanLST, x))
- end repeat
- repeat with x = 6 to 10
- set tx to getAt(FieldTxLST, x)
- if tx starts "Type Idea" then
- nothing()
- next repeat
- end if
- addProp(PsychicChanLST, 2, getAt(FieldChanLST, x))
- end repeat
- go("colorEnter")
- end
-
- on ColorEnter me, x
- RandoResultSnd()
- set clrseed to x
- go("ready")
- end
-
- on continue2 me
- if clrseed = 0 then
- set clrseed to random(5) + random(100)
- end if
- repeat with x = 1 to count(PsychicChanLST)
- set chan to getAt(PsychicChanLST, x)
- puppetSprite(chan, 1)
- DropOn(me, chan)
- end repeat
- end
-
- on DropOn me, chan
- set h to gridH(me)
- set v to gridV(me)
- set the locH of sprite chan to h
- set the locV of sprite chan to v
- end
-
- on gridH me
- set c to clrseed
- if c > 10 then
- set c to c / 2
- end if
- if c < 2 then
- set c to 2
- end if
- set a to random(512)
- if a > c then
- set a to a - random(c)
- else
- if a < c then
- set a to a + random(c)
- end if
- end if
- if a > 500 then
- set a to 500 + random(4)
- else
- if a < 10 then
- set a to 12 + random(4)
- end if
- end if
- return a
- end
-
- on gridV me
- set c to clrseed
- if c > 10 then
- set c to c / 2
- end if
- if c < 2 then
- set c to 2
- end if
- set a to random(384)
- if a > c then
- set a to a - random(c)
- else
- if a < c then
- set a to a + random(c)
- end if
- end if
- if a > 365 then
- set a to 360 + random(4)
- else
- if a < 10 then
- set a to 12 + random(4)
- end if
- end if
- return a
- end
-
- on BoundoH me, n
- if n > 500 then
- set n to 500 - random(30)
- else
- if n < 10 then
- set n to 12 + random(4)
- end if
- end if
- return n
- end
-
- on BoundoV me, n
- if n > 380 then
- set n to 380 - random(30)
- else
- if n < 10 then
- set n to 12 + random(4)
- end if
- end if
- return n
- end
-
- on PlaceIt me, chan, h, v
- set the locH of sprite chan to h
- set the locV of sprite chan to v
- end
-
- on DrawIt me, chan, art
- set the castNum of sprite chan to art
- end
-
- on grabpos me
- nothing()
- end
-
- on slideanim me
- repeat with x = 1 to count(PsychicChanLST)
- set modi to random(rando * 2) - (rando + 1)
- set chan to getAt(PsychicChanLST, x)
- set h to the locH of sprite chan
- set v to the locV of sprite chan
- set h to h + modi
- set h to BoundoH(me, h)
- set modi to random(rando * 2) - (rando + 1)
- set v to v + modi
- set v to BoundoV(me, v)
- PlaceIt(me, chan, h, v)
- end repeat
- end
-
- on RevealNames me
- RandoResultSnd()
- repeat with x = 1 to count(PsychicChanLST)
- set chan to getAt(PsychicChanLST, x)
- set the locH of sprite (chan + 10) to the locH of sprite chan - 60
- set the locV of sprite (chan + 10) to the locV of sprite chan
- PlaceIt(me, chan, 600, 600)
- end repeat
- end
-
- on ExitSession me
- cleanup(me)
- FirstPage()
- end
-
- on cleanup me
- repeat with x = 3 to 22
- puppetSprite(x, 0)
- end repeat
- end
-